Skip to content

Conversation

MuhammedZamroodh
Copy link
Collaborator

No description provided.

Lakshminarasimhan1998 and others added 2 commits October 14, 2025 21:27
Highlights:
- UART interrupt support
- Program memory optimisation
- Support for ztest and twister
- Context switch refignment
- Kernel and thread test cases
- Samples support
   - UART: Echo bot, native tty, passthrough
   - Blinky
   - Philosophers
   - Hello world
- Pin control driver
- New board support (sdPIC33AK512MPS512)
Fixes:
- Context switch fixes
- System timer fixes
- Build fixes

Signed-off-by: Muhammed Zamroodh <[email protected]>
Highlights:
        * Added support for dsPIC33AK512MPS512
        * Fixes for kernel and arch test cases
        * Context switching refignments
        * Change console to on board USB-UART
        * Added satck protection
Fixes:
        * Context switch fixes
        * System timer fixes

Signed-off-by: Muhammed Zamroodh <[email protected]>
ret = -EINVAL;
}

return 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt this return "ret"? this is always returning 0

int ret = 0;

for (uint8_t i = 0U; i < pin_cnt; i++) {
ret = pinctrl_configure_pin(pins[i]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only the last pin result is returned. Should we return on first error or accumulate errors(for debugging purpose)?

key = k_spin_lock(&lock);
/* If receiver buffer is empty, return -1 */
if ((*UxSTA & BIT_RXBE) != 0U) {
ret_val = -EPERM;
Copy link
Collaborator

@harishagari harishagari Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "-EPERM" is the right error code in this case? Isnt ENODATA or EAGAIN more appropriate here?

*tris &= ~BIT(pin);
} else {
*tris |= BIT(pin);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we also configure Open Drain , Weak Pull up , pull down , IOC , Start High etc?

static int dspic_port_clear_bits_raw(const struct device *dev, gpio_port_pins_t pins)
{
const struct gpio_dspic_cfg *cfg = dev->config;
volatile uint16_t *lat = (void *)(cfg->base + LAT_OFFSET);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all functions by default returns 0 , is this expected , do we need to add error handling and return appropriate errors?

(2 * DT_INST_PROP(0, prescalar) * CONFIG_SYS_CLOCK_TICKS_PER_SEC))
((sys_clock_hw_cycles_per_sec() + \
((2U * DT_INST_PROP(0, prescalar) * CONFIG_SYS_CLOCK_TICKS_PER_SEC) / 2U)) / \
(2U * DT_INST_PROP(0, prescalar) * CONFIG_SYS_CLOCK_TICKS_PER_SEC))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo->prescaler


/* Clear the timer interrupt flag status bit*/
IFS1bits.T1IF = 0;
total_cycles = total_cycles + (uint64_t)PR1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interrupt flag clearing is not required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants